package com.xiweicheng.test.springboot.hibernate.jpa.entity;
// Generated 2018-7-13 20:57:41 by Hibernate Tools 5.0.6.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * ChatChannel generated by hbm2java
 */
@Entity
@Table(name = "chat_channel", catalog = "tms")
public class ChatChannel implements java.io.Serializable {

	private Long id;
	private long version;
	private Channel channel;
	private Users usersByCreator;
	private Users usersByUpdater;
	private String content;
	private Date createDate;
	private Boolean openEdit;
	private String status;
	private String type;
	private String ua;
	private Date updateDate;
	private String voteCai;
	private Integer voteCaiCnt;
	private String voteZan;
	private Integer voteZanCnt;
	private Set chatChannelFollowers = new HashSet(0);
	private Set chatStows = new HashSet(0);
	private Set chatAts = new HashSet(0);
	private Set chatReplies = new HashSet(0);
	private Set chatLabels = new HashSet(0);
	private Set chatPins = new HashSet(0);

	public ChatChannel() {
	}

	public ChatChannel(String status) {
		this.status = status;
	}

	public ChatChannel(Channel channel, Users usersByCreator, Users usersByUpdater, String content, Date createDate,
			Boolean openEdit, String status, String type, String ua, Date updateDate, String voteCai,
			Integer voteCaiCnt, String voteZan, Integer voteZanCnt, Set chatChannelFollowers, Set chatStows,
			Set chatAts, Set chatReplies, Set chatLabels, Set chatPins) {
		this.channel = channel;
		this.usersByCreator = usersByCreator;
		this.usersByUpdater = usersByUpdater;
		this.content = content;
		this.createDate = createDate;
		this.openEdit = openEdit;
		this.status = status;
		this.type = type;
		this.ua = ua;
		this.updateDate = updateDate;
		this.voteCai = voteCai;
		this.voteCaiCnt = voteCaiCnt;
		this.voteZan = voteZan;
		this.voteZanCnt = voteZanCnt;
		this.chatChannelFollowers = chatChannelFollowers;
		this.chatStows = chatStows;
		this.chatAts = chatAts;
		this.chatReplies = chatReplies;
		this.chatLabels = chatLabels;
		this.chatPins = chatPins;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "version", nullable = false)
	public long getVersion() {
		return this.version;
	}

	public void setVersion(long version) {
		this.version = version;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "channel")
	public Channel getChannel() {
		return this.channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "creator")
	public Users getUsersByCreator() {
		return this.usersByCreator;
	}

	public void setUsersByCreator(Users usersByCreator) {
		this.usersByCreator = usersByCreator;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "updater")
	public Users getUsersByUpdater() {
		return this.usersByUpdater;
	}

	public void setUsersByUpdater(Users usersByUpdater) {
		this.usersByUpdater = usersByUpdater;
	}

	@Column(name = "content")
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date", length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "open_edit")
	public Boolean getOpenEdit() {
		return this.openEdit;
	}

	public void setOpenEdit(Boolean openEdit) {
		this.openEdit = openEdit;
	}

	@Column(name = "status", nullable = false)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "type")
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "ua", length = 1000)
	public String getUa() {
		return this.ua;
	}

	public void setUa(String ua) {
		this.ua = ua;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_date", length = 19)
	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@Column(name = "vote_cai")
	public String getVoteCai() {
		return this.voteCai;
	}

	public void setVoteCai(String voteCai) {
		this.voteCai = voteCai;
	}

	@Column(name = "vote_cai_cnt")
	public Integer getVoteCaiCnt() {
		return this.voteCaiCnt;
	}

	public void setVoteCaiCnt(Integer voteCaiCnt) {
		this.voteCaiCnt = voteCaiCnt;
	}

	@Column(name = "vote_zan")
	public String getVoteZan() {
		return this.voteZan;
	}

	public void setVoteZan(String voteZan) {
		this.voteZan = voteZan;
	}

	@Column(name = "vote_zan_cnt")
	public Integer getVoteZanCnt() {
		return this.voteZanCnt;
	}

	public void setVoteZanCnt(Integer voteZanCnt) {
		this.voteZanCnt = voteZanCnt;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chatChannel")
	public Set getChatChannelFollowers() {
		return this.chatChannelFollowers;
	}

	public void setChatChannelFollowers(Set chatChannelFollowers) {
		this.chatChannelFollowers = chatChannelFollowers;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chatChannel")
	public Set getChatStows() {
		return this.chatStows;
	}

	public void setChatStows(Set chatStows) {
		this.chatStows = chatStows;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chatChannel")
	public Set getChatAts() {
		return this.chatAts;
	}

	public void setChatAts(Set chatAts) {
		this.chatAts = chatAts;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chatChannel")
	public Set getChatReplies() {
		return this.chatReplies;
	}

	public void setChatReplies(Set chatReplies) {
		this.chatReplies = chatReplies;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chatChannel")
	public Set getChatLabels() {
		return this.chatLabels;
	}

	public void setChatLabels(Set chatLabels) {
		this.chatLabels = chatLabels;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chatChannel")
	public Set getChatPins() {
		return this.chatPins;
	}

	public void setChatPins(Set chatPins) {
		this.chatPins = chatPins;
	}

}
